<!--学生查看毕设审核状态-->
<style>
	.bottom_10 {
		margin-bottom: 20px;
	}
	
	.span_red {
		color: red;
		font-weight: 600;
	}
	
	#ketixinxi11 {
		height: 240px;
	}
</style>

<h3 class="bottom_10">已选报毕设详情</h3>
<div class="input-group bottom_10">
	<span class="input-group-addon" id="ketimingcheng">毕设名称</span>
	<input id="ketimingcheng1" type="text" class="form-control" aria-describedby="ketimingcheng" readonly>
</div>
<div class="input-group bottom_10">
	<span class="input-group-addon" id="ketixinxi1">毕设信息</span>
	<textarea class="form-control" type="text" id="ketixinxi11" aria-describedby="ketixinxi1" readonly></textarea>
</div>
<div class="input-group bottom_10">
	<span class="input-group-addon" id="zhidaolaoshi">指导老师</span>
	<input id="zhidaolaoshi1" type="text" class="form-control" aria-describedby="zhidaolaoshi" readonly>
</div>

<h4>审核状态&emsp;<span class="span_red">--</span></h4>

<script>
	function sel_gid(gid) {
		$.ajax({
			xhrFields: {
				withCredentials: true
			},
			type: 'get',
			url: getFullURL('sel-topic'),
			data: {
				gid: gid
			},
			dataType: 'json',
			success: function(data) {
				console.log(data)
				if(data.status == 0) {
					$('#ketimingcheng1').val(data.topic.topic);
					$('#ketixinxi11').val(data.topic.content);
					$('#zhidaolaoshi1').val(data.topic.teacher.name);
				}
			},
			error: function(err) {
				alert("请求异常，请重新登录！", function() {
					$(location).attr('href', './login.html');
				})
			}
		})
	}

	$.ajax({
		xhrFields: {
			withCredentials: true
		},
		type: 'get',
		url: getFullURL('user/bstp-status'),
		data: {},
		dataType: 'json',
		success: function(data) {
			console.log(data)
			if(data.bsStatus == -1) {
				$('.span_red').html("未选报");
			} else {
				if(data.bsStatus == 0) {
					$('.span_red').html("未通过");
				} else if(data.bsStatus == 2) {
					$('.span_red').html("通过");
				} else if(data.bsStatus == 1) {
					$('.span_red').html("审核中");
				}

				sel_gid(data.gid);
			}
		},
		error: function(err) {
			alert("请求异常，请重新登录！", function() {
				$(location).attr('href', './login.html');
			})
		}
	})
</script>